import { BaseResponseData } from "@renderer/interface/baseData";
import { GradeForm } from "@renderer/interface/grade";
import http from "@renderer/utils/request";

/**
 * 保存等级信息
 * @param data 等级表单
 * @returns 
 */
export const postGradeAOUApi = (data: GradeForm) =>
	http.post<BaseResponseData<string>>(`/crm/teach/grade/${data.id ? 'update' : 'add'}`, data)

/**
 * 根据等级 id 获取等级信息
 * @param id 等级id
 * @returns 等级信息
 */
export const getGradeGetApi = (id: string) =>
	http.get<BaseResponseData<GradeForm>>(`/crm/teach/grade/get/${id}`)

/**
 * 根据id删除等级
 * @param id 等级id
 * @returns 
 */
export const getGradeDelApi = (id: string) =>
	http.get<BaseResponseData<string>>(`/crm/teach/grade/delete/${id}`)